package com.galen.manual.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.Max;

@Data
@Schema(description = "用户查询条件")
public class UserQueryDTO {

    @Schema(description = "用户昵称")
    private String nickname;

    @Schema(description = "手机号")
    private String phone;

    @Schema(description = "用户等级 1-普通用户 2-高级用户 3-VIP用户")
    private Integer userLevel;

    @Schema(description = "状态 0-待审核 1-正常 2-冻结 3-黑名单")
    private Integer status;

    @Schema(description = "是否管理员")
    private Boolean isAdmin;

    @Schema(description = "开始时间 yyyy-MM-dd HH:mm:ss")
    private String startTime;

    @Schema(description = "结束时间 yyyy-MM-dd HH:mm:ss")
    private String endTime;

    @Min(value = 1, message = "页码必须大于0")
    @Schema(description = "页码", defaultValue = "1")
    private Integer pageNum = 1;

    @Min(value = 1, message = "每页数量必须大于0")
    @Max(value = 100, message = "每页数量不能超过100")
    @Schema(description = "每页数量", defaultValue = "10")
    private Integer pageSize = 10;
}